3.252 \(\int (a+a \sin (e+f x))^2 (A+B \sin (e+f x)) (c+d \sin (e+f x))^2 \, dx\)

Optimal. Leaf size=336 \[ \frac{a^2 \left (5 A d \left (-8 c^2 d+c^3-20 c d^2-8 d^3\right )-2 B \left (16 c^2 d^2-5 c^3 d+c^4+40 c d^3+18 d^4\right )\right ) \cos (e+f x)}{30 d^2 f}+\frac{a^2 \left (5 A d (c-8 d)-2 B \left (c^2-5 c d+18 d^2\right )\right ) \cos (e+f x) (c+d \sin (e+f x))^2}{60 d^2 f}+\frac{a^2 \left (5 A d \left (2 c^2-16 c d-21 d^2\right )-B \left (-20 c^2 d+4 c^3+66 c d^2+90 d^3\right )\right ) \sin (e+f x) \cos (e+f x)}{120 d f}+\frac{1}{8} a^2 x \left (12 A c^2+16 A c d+7 A d^2+8 B c^2+14 B c d+6 B d^2\right )+\frac{a^2 (2 B (c-3 d)-5 A d) \cos (e+f x) (c+d \sin (e+f x))^3}{20 d^2 f}-\frac{B \cos (e+f x) \left (a^2 \sin (e+f x)+a^2\right ) (c+d \sin (e+f x))^3}{5 d f} \]

[Out]

(a^2*(12*A*c^2 + 8*B*c^2 + 16*A*c*d + 14*B*c*d + 7*A*d^2 + 6*B*d^2)*x)/8 + (a^2*(5*A*d*(c^3 - 8*c^2*d - 20*c*d
^2 - 8*d^3) - 2*B*(c^4 - 5*c^3*d + 16*c^2*d^2 + 40*c*d^3 + 18*d^4))*Cos[e + f*x])/(30*d^2*f) + (a^2*(5*A*d*(2*
c^2 - 16*c*d - 21*d^2) - B*(4*c^3 - 20*c^2*d + 66*c*d^2 + 90*d^3))*Cos[e + f*x]*Sin[e + f*x])/(120*d*f) + (a^2
*(5*A*(c - 8*d)*d - 2*B*(c^2 - 5*c*d + 18*d^2))*Cos[e + f*x]*(c + d*Sin[e + f*x])^2)/(60*d^2*f) + (a^2*(2*B*(c
 - 3*d) - 5*A*d)*Cos[e + f*x]*(c + d*Sin[e + f*x])^3)/(20*d^2*f) - (B*Cos[e + f*x]*(a^2 + a^2*Sin[e + f*x])*(c
 + d*Sin[e + f*x])^3)/(5*d*f)

________________________________________________________________________________________

Rubi [A]  time = 0.703095, antiderivative size = 336, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 5, integrand size = 35, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.143, Rules used = {2976, 2968, 3023, 2753, 2734} \[ \frac{a^2 \left (5 A d \left (-8 c^2 d+c^3-20 c d^2-8 d^3\right )-2 B \left (16 c^2 d^2-5 c^3 d+c^4+40 c d^3+18 d^4\right )\right ) \cos (e+f x)}{30 d^2 f}+\frac{a^2 \left (5 A d (c-8 d)-2 B \left (c^2-5 c d+18 d^2\right )\right ) \cos (e+f x) (c+d \sin (e+f x))^2}{60 d^2 f}+\frac{a^2 \left (5 A d \left (2 c^2-16 c d-21 d^2\right )-B \left (-20 c^2 d+4 c^3+66 c d^2+90 d^3\right )\right ) \sin (e+f x) \cos (e+f x)}{120 d f}+\frac{1}{8} a^2 x \left (12 A c^2+16 A c d+7 A d^2+8 B c^2+14 B c d+6 B d^2\right )+\frac{a^2 (2 B (c-3 d)-5 A d) \cos (e+f x) (c+d \sin (e+f x))^3}{20 d^2 f}-\frac{B \cos (e+f x) \left (a^2 \sin (e+f x)+a^2\right ) (c+d \sin (e+f x))^3}{5 d f} \]

Antiderivative was successfully verified.

[In]

Int[(a + a*Sin[e + f*x])^2*(A + B*Sin[e + f*x])*(c + d*Sin[e + f*x])^2,x]

[Out]

(a^2*(12*A*c^2 + 8*B*c^2 + 16*A*c*d + 14*B*c*d + 7*A*d^2 + 6*B*d^2)*x)/8 + (a^2*(5*A*d*(c^3 - 8*c^2*d - 20*c*d
^2 - 8*d^3) - 2*B*(c^4 - 5*c^3*d + 16*c^2*d^2 + 40*c*d^3 + 18*d^4))*Cos[e + f*x])/(30*d^2*f) + (a^2*(5*A*d*(2*
c^2 - 16*c*d - 21*d^2) - B*(4*c^3 - 20*c^2*d + 66*c*d^2 + 90*d^3))*Cos[e + f*x]*Sin[e + f*x])/(120*d*f) + (a^2
*(5*A*(c - 8*d)*d - 2*B*(c^2 - 5*c*d + 18*d^2))*Cos[e + f*x]*(c + d*Sin[e + f*x])^2)/(60*d^2*f) + (a^2*(2*B*(c
 - 3*d) - 5*A*d)*Cos[e + f*x]*(c + d*Sin[e + f*x])^3)/(20*d^2*f) - (B*Cos[e + f*x]*(a^2 + a^2*Sin[e + f*x])*(c
 + d*Sin[e + f*x])^3)/(5*d*f)

Rule 2976

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*sin[(e_
.) + (f_.)*(x_)])^(n_), x_Symbol] :> -Simp[(b*B*Cos[e + f*x]*(a + b*Sin[e + f*x])^(m - 1)*(c + d*Sin[e + f*x])
^(n + 1))/(d*f*(m + n + 1)), x] + Dist[1/(d*(m + n + 1)), Int[(a + b*Sin[e + f*x])^(m - 1)*(c + d*Sin[e + f*x]
)^n*Simp[a*A*d*(m + n + 1) + B*(a*c*(m - 1) + b*d*(n + 1)) + (A*b*d*(m + n + 1) - B*(b*c*m - a*d*(2*m + n)))*S
in[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f, A, B, n}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 - b^2, 0] &&
NeQ[c^2 - d^2, 0] && GtQ[m, 1/2] &&  !LtQ[n, -1] && IntegerQ[2*m] && (IntegerQ[2*n] || EqQ[c, 0])

Rule 2968

Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*sin[(
e_.) + (f_.)*(x_)]), x_Symbol] :> Int[(a + b*Sin[e + f*x])^m*(A*c + (B*c + A*d)*Sin[e + f*x] + B*d*Sin[e + f*x
]^2), x] /; FreeQ[{a, b, c, d, e, f, A, B, m}, x] && NeQ[b*c - a*d, 0]

Rule 3023

Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)] + (C_.)*sin[(e_.) + (
f_.)*(x_)]^2), x_Symbol] :> -Simp[(C*Cos[e + f*x]*(a + b*Sin[e + f*x])^(m + 1))/(b*f*(m + 2)), x] + Dist[1/(b*
(m + 2)), Int[(a + b*Sin[e + f*x])^m*Simp[A*b*(m + 2) + b*C*(m + 1) + (b*B*(m + 2) - a*C)*Sin[e + f*x], x], x]
, x] /; FreeQ[{a, b, e, f, A, B, C, m}, x] &&  !LtQ[m, -1]

Rule 2753

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> -Simp[(d
*Cos[e + f*x]*(a + b*Sin[e + f*x])^m)/(f*(m + 1)), x] + Dist[1/(m + 1), Int[(a + b*Sin[e + f*x])^(m - 1)*Simp[
b*d*m + a*c*(m + 1) + (a*d*m + b*c*(m + 1))*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*
c - a*d, 0] && NeQ[a^2 - b^2, 0] && GtQ[m, 0] && IntegerQ[2*m]

Rule 2734

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[((2*a*c
+ b*d)*x)/2, x] + (-Simp[((b*c + a*d)*Cos[e + f*x])/f, x] - Simp[(b*d*Cos[e + f*x]*Sin[e + f*x])/(2*f), x]) /;
 FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0]

Rubi steps

\begin{align*} \int (a+a \sin (e+f x))^2 (A+B \sin (e+f x)) (c+d \sin (e+f x))^2 \, dx &=-\frac{B \cos (e+f x) \left (a^2+a^2 \sin (e+f x)\right ) (c+d \sin (e+f x))^3}{5 d f}+\frac{\int (a+a \sin (e+f x)) (c+d \sin (e+f x))^2 (a (5 A d+B (c+3 d))-a (2 B c-5 A d-6 B d) \sin (e+f x)) \, dx}{5 d}\\ &=-\frac{B \cos (e+f x) \left (a^2+a^2 \sin (e+f x)\right ) (c+d \sin (e+f x))^3}{5 d f}+\frac{\int (c+d \sin (e+f x))^2 \left (a^2 (5 A d+B (c+3 d))+\left (-a^2 (2 B c-5 A d-6 B d)+a^2 (5 A d+B (c+3 d))\right ) \sin (e+f x)-a^2 (2 B c-5 A d-6 B d) \sin ^2(e+f x)\right ) \, dx}{5 d}\\ &=\frac{a^2 (2 B (c-3 d)-5 A d) \cos (e+f x) (c+d \sin (e+f x))^3}{20 d^2 f}-\frac{B \cos (e+f x) \left (a^2+a^2 \sin (e+f x)\right ) (c+d \sin (e+f x))^3}{5 d f}+\frac{\int (c+d \sin (e+f x))^2 \left (-a^2 d (2 B c-35 A d-30 B d)-a^2 \left (5 A (c-8 d) d-2 B \left (c^2-5 c d+18 d^2\right )\right ) \sin (e+f x)\right ) \, dx}{20 d^2}\\ &=\frac{a^2 \left (5 A (c-8 d) d-2 B \left (c^2-5 c d+18 d^2\right )\right ) \cos (e+f x) (c+d \sin (e+f x))^2}{60 d^2 f}+\frac{a^2 (2 B (c-3 d)-5 A d) \cos (e+f x) (c+d \sin (e+f x))^3}{20 d^2 f}-\frac{B \cos (e+f x) \left (a^2+a^2 \sin (e+f x)\right ) (c+d \sin (e+f x))^3}{5 d f}+\frac{\int (c+d \sin (e+f x)) \left (a^2 d \left (5 A d (19 c+16 d)-B \left (2 c^2-70 c d-72 d^2\right )\right )-a^2 \left (5 A d \left (2 c^2-16 c d-21 d^2\right )-2 B \left (2 c^3-10 c^2 d+33 c d^2+45 d^3\right )\right ) \sin (e+f x)\right ) \, dx}{60 d^2}\\ &=\frac{1}{8} a^2 \left (12 A c^2+8 B c^2+16 A c d+14 B c d+7 A d^2+6 B d^2\right ) x+\frac{a^2 \left (5 A d \left (c^3-8 c^2 d-20 c d^2-8 d^3\right )-2 B \left (c^4-5 c^3 d+16 c^2 d^2+40 c d^3+18 d^4\right )\right ) \cos (e+f x)}{30 d^2 f}+\frac{a^2 \left (5 A d \left (2 c^2-16 c d-21 d^2\right )-B \left (4 c^3-20 c^2 d+66 c d^2+90 d^3\right )\right ) \cos (e+f x) \sin (e+f x)}{120 d f}+\frac{a^2 \left (5 A (c-8 d) d-2 B \left (c^2-5 c d+18 d^2\right )\right ) \cos (e+f x) (c+d \sin (e+f x))^2}{60 d^2 f}+\frac{a^2 (2 B (c-3 d)-5 A d) \cos (e+f x) (c+d \sin (e+f x))^3}{20 d^2 f}-\frac{B \cos (e+f x) \left (a^2+a^2 \sin (e+f x)\right ) (c+d \sin (e+f x))^3}{5 d f}\\ \end{align*}

Mathematica [A]  time = 1.52556, size = 296, normalized size = 0.88 \[ -\frac{a^2 \cos (e+f x) \left (60 \left (A \left (12 c^2+16 c d+7 d^2\right )+2 B \left (4 c^2+7 c d+3 d^2\right )\right ) \sin ^{-1}\left (\frac{\sqrt{1-\sin (e+f x)}}{\sqrt{2}}\right )+\sqrt{\cos ^2(e+f x)} \left (-8 \left (10 A d (c+d)+B \left (5 c^2+20 c d+12 d^2\right )\right ) \cos (2 (e+f x))+120 A c^2 \sin (e+f x)+480 A c^2+480 A c d \sin (e+f x)+880 A c d+255 A d^2 \sin (e+f x)-15 A d^2 \sin (3 (e+f x))+400 A d^2+240 B c^2 \sin (e+f x)+440 B c^2+510 B c d \sin (e+f x)-30 B c d \sin (3 (e+f x))+800 B c d+270 B d^2 \sin (e+f x)-30 B d^2 \sin (3 (e+f x))+6 B d^2 \cos (4 (e+f x))+378 B d^2\right )\right )}{240 f \sqrt{\cos ^2(e+f x)}} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + a*Sin[e + f*x])^2*(A + B*Sin[e + f*x])*(c + d*Sin[e + f*x])^2,x]

[Out]

-(a^2*Cos[e + f*x]*(60*(2*B*(4*c^2 + 7*c*d + 3*d^2) + A*(12*c^2 + 16*c*d + 7*d^2))*ArcSin[Sqrt[1 - Sin[e + f*x
]]/Sqrt[2]] + Sqrt[Cos[e + f*x]^2]*(480*A*c^2 + 440*B*c^2 + 880*A*c*d + 800*B*c*d + 400*A*d^2 + 378*B*d^2 - 8*
(10*A*d*(c + d) + B*(5*c^2 + 20*c*d + 12*d^2))*Cos[2*(e + f*x)] + 6*B*d^2*Cos[4*(e + f*x)] + 120*A*c^2*Sin[e +
 f*x] + 240*B*c^2*Sin[e + f*x] + 480*A*c*d*Sin[e + f*x] + 510*B*c*d*Sin[e + f*x] + 255*A*d^2*Sin[e + f*x] + 27
0*B*d^2*Sin[e + f*x] - 30*B*c*d*Sin[3*(e + f*x)] - 15*A*d^2*Sin[3*(e + f*x)] - 30*B*d^2*Sin[3*(e + f*x)])))/(2
40*f*Sqrt[Cos[e + f*x]^2])

________________________________________________________________________________________

Maple [A]  time = 0.066, size = 496, normalized size = 1.5 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+a*sin(f*x+e))^2*(A+B*sin(f*x+e))*(c+d*sin(f*x+e))^2,x)

[Out]

1/f*(A*a^2*c^2*(-1/2*sin(f*x+e)*cos(f*x+e)+1/2*f*x+1/2*e)-2/3*A*a^2*c*d*(2+sin(f*x+e)^2)*cos(f*x+e)+A*a^2*d^2*
(-1/4*(sin(f*x+e)^3+3/2*sin(f*x+e))*cos(f*x+e)+3/8*f*x+3/8*e)-1/3*B*a^2*c^2*(2+sin(f*x+e)^2)*cos(f*x+e)+2*B*a^
2*c*d*(-1/4*(sin(f*x+e)^3+3/2*sin(f*x+e))*cos(f*x+e)+3/8*f*x+3/8*e)-1/5*B*a^2*d^2*(8/3+sin(f*x+e)^4+4/3*sin(f*
x+e)^2)*cos(f*x+e)-2*A*a^2*c^2*cos(f*x+e)+4*A*a^2*c*d*(-1/2*sin(f*x+e)*cos(f*x+e)+1/2*f*x+1/2*e)-2/3*A*a^2*d^2
*(2+sin(f*x+e)^2)*cos(f*x+e)+2*B*a^2*c^2*(-1/2*sin(f*x+e)*cos(f*x+e)+1/2*f*x+1/2*e)-4/3*B*a^2*c*d*(2+sin(f*x+e
)^2)*cos(f*x+e)+2*B*a^2*d^2*(-1/4*(sin(f*x+e)^3+3/2*sin(f*x+e))*cos(f*x+e)+3/8*f*x+3/8*e)+A*a^2*c^2*(f*x+e)-2*
A*a^2*c*d*cos(f*x+e)+A*a^2*d^2*(-1/2*sin(f*x+e)*cos(f*x+e)+1/2*f*x+1/2*e)-B*a^2*c^2*cos(f*x+e)+2*B*a^2*c*d*(-1
/2*sin(f*x+e)*cos(f*x+e)+1/2*f*x+1/2*e)-1/3*B*a^2*d^2*(2+sin(f*x+e)^2)*cos(f*x+e))

________________________________________________________________________________________

Maxima [A]  time = 0.992176, size = 645, normalized size = 1.92 \begin{align*} \frac{120 \,{\left (2 \, f x + 2 \, e - \sin \left (2 \, f x + 2 \, e\right )\right )} A a^{2} c^{2} + 480 \,{\left (f x + e\right )} A a^{2} c^{2} + 160 \,{\left (\cos \left (f x + e\right )^{3} - 3 \, \cos \left (f x + e\right )\right )} B a^{2} c^{2} + 240 \,{\left (2 \, f x + 2 \, e - \sin \left (2 \, f x + 2 \, e\right )\right )} B a^{2} c^{2} + 320 \,{\left (\cos \left (f x + e\right )^{3} - 3 \, \cos \left (f x + e\right )\right )} A a^{2} c d + 480 \,{\left (2 \, f x + 2 \, e - \sin \left (2 \, f x + 2 \, e\right )\right )} A a^{2} c d + 640 \,{\left (\cos \left (f x + e\right )^{3} - 3 \, \cos \left (f x + e\right )\right )} B a^{2} c d + 30 \,{\left (12 \, f x + 12 \, e + \sin \left (4 \, f x + 4 \, e\right ) - 8 \, \sin \left (2 \, f x + 2 \, e\right )\right )} B a^{2} c d + 240 \,{\left (2 \, f x + 2 \, e - \sin \left (2 \, f x + 2 \, e\right )\right )} B a^{2} c d + 320 \,{\left (\cos \left (f x + e\right )^{3} - 3 \, \cos \left (f x + e\right )\right )} A a^{2} d^{2} + 15 \,{\left (12 \, f x + 12 \, e + \sin \left (4 \, f x + 4 \, e\right ) - 8 \, \sin \left (2 \, f x + 2 \, e\right )\right )} A a^{2} d^{2} + 120 \,{\left (2 \, f x + 2 \, e - \sin \left (2 \, f x + 2 \, e\right )\right )} A a^{2} d^{2} - 32 \,{\left (3 \, \cos \left (f x + e\right )^{5} - 10 \, \cos \left (f x + e\right )^{3} + 15 \, \cos \left (f x + e\right )\right )} B a^{2} d^{2} + 160 \,{\left (\cos \left (f x + e\right )^{3} - 3 \, \cos \left (f x + e\right )\right )} B a^{2} d^{2} + 30 \,{\left (12 \, f x + 12 \, e + \sin \left (4 \, f x + 4 \, e\right ) - 8 \, \sin \left (2 \, f x + 2 \, e\right )\right )} B a^{2} d^{2} - 960 \, A a^{2} c^{2} \cos \left (f x + e\right ) - 480 \, B a^{2} c^{2} \cos \left (f x + e\right ) - 960 \, A a^{2} c d \cos \left (f x + e\right )}{480 \, f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sin(f*x+e))^2*(A+B*sin(f*x+e))*(c+d*sin(f*x+e))^2,x, algorithm="maxima")

[Out]

1/480*(120*(2*f*x + 2*e - sin(2*f*x + 2*e))*A*a^2*c^2 + 480*(f*x + e)*A*a^2*c^2 + 160*(cos(f*x + e)^3 - 3*cos(
f*x + e))*B*a^2*c^2 + 240*(2*f*x + 2*e - sin(2*f*x + 2*e))*B*a^2*c^2 + 320*(cos(f*x + e)^3 - 3*cos(f*x + e))*A
*a^2*c*d + 480*(2*f*x + 2*e - sin(2*f*x + 2*e))*A*a^2*c*d + 640*(cos(f*x + e)^3 - 3*cos(f*x + e))*B*a^2*c*d +
30*(12*f*x + 12*e + sin(4*f*x + 4*e) - 8*sin(2*f*x + 2*e))*B*a^2*c*d + 240*(2*f*x + 2*e - sin(2*f*x + 2*e))*B*
a^2*c*d + 320*(cos(f*x + e)^3 - 3*cos(f*x + e))*A*a^2*d^2 + 15*(12*f*x + 12*e + sin(4*f*x + 4*e) - 8*sin(2*f*x
 + 2*e))*A*a^2*d^2 + 120*(2*f*x + 2*e - sin(2*f*x + 2*e))*A*a^2*d^2 - 32*(3*cos(f*x + e)^5 - 10*cos(f*x + e)^3
 + 15*cos(f*x + e))*B*a^2*d^2 + 160*(cos(f*x + e)^3 - 3*cos(f*x + e))*B*a^2*d^2 + 30*(12*f*x + 12*e + sin(4*f*
x + 4*e) - 8*sin(2*f*x + 2*e))*B*a^2*d^2 - 960*A*a^2*c^2*cos(f*x + e) - 480*B*a^2*c^2*cos(f*x + e) - 960*A*a^2
*c*d*cos(f*x + e))/f

________________________________________________________________________________________

Fricas [A]  time = 2.26476, size = 574, normalized size = 1.71 \begin{align*} -\frac{24 \, B a^{2} d^{2} \cos \left (f x + e\right )^{5} - 40 \,{\left (B a^{2} c^{2} + 2 \,{\left (A + 2 \, B\right )} a^{2} c d +{\left (2 \, A + 3 \, B\right )} a^{2} d^{2}\right )} \cos \left (f x + e\right )^{3} - 15 \,{\left (4 \,{\left (3 \, A + 2 \, B\right )} a^{2} c^{2} + 2 \,{\left (8 \, A + 7 \, B\right )} a^{2} c d +{\left (7 \, A + 6 \, B\right )} a^{2} d^{2}\right )} f x + 240 \,{\left ({\left (A + B\right )} a^{2} c^{2} + 2 \,{\left (A + B\right )} a^{2} c d +{\left (A + B\right )} a^{2} d^{2}\right )} \cos \left (f x + e\right ) - 15 \,{\left (2 \,{\left (2 \, B a^{2} c d +{\left (A + 2 \, B\right )} a^{2} d^{2}\right )} \cos \left (f x + e\right )^{3} -{\left (4 \,{\left (A + 2 \, B\right )} a^{2} c^{2} + 2 \,{\left (8 \, A + 9 \, B\right )} a^{2} c d +{\left (9 \, A + 10 \, B\right )} a^{2} d^{2}\right )} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )}{120 \, f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sin(f*x+e))^2*(A+B*sin(f*x+e))*(c+d*sin(f*x+e))^2,x, algorithm="fricas")

[Out]

-1/120*(24*B*a^2*d^2*cos(f*x + e)^5 - 40*(B*a^2*c^2 + 2*(A + 2*B)*a^2*c*d + (2*A + 3*B)*a^2*d^2)*cos(f*x + e)^
3 - 15*(4*(3*A + 2*B)*a^2*c^2 + 2*(8*A + 7*B)*a^2*c*d + (7*A + 6*B)*a^2*d^2)*f*x + 240*((A + B)*a^2*c^2 + 2*(A
 + B)*a^2*c*d + (A + B)*a^2*d^2)*cos(f*x + e) - 15*(2*(2*B*a^2*c*d + (A + 2*B)*a^2*d^2)*cos(f*x + e)^3 - (4*(A
 + 2*B)*a^2*c^2 + 2*(8*A + 9*B)*a^2*c*d + (9*A + 10*B)*a^2*d^2)*cos(f*x + e))*sin(f*x + e))/f

________________________________________________________________________________________

Sympy [A]  time = 5.84911, size = 1129, normalized size = 3.36 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sin(f*x+e))**2*(A+B*sin(f*x+e))*(c+d*sin(f*x+e))**2,x)

[Out]

Piecewise((A*a**2*c**2*x*sin(e + f*x)**2/2 + A*a**2*c**2*x*cos(e + f*x)**2/2 + A*a**2*c**2*x - A*a**2*c**2*sin
(e + f*x)*cos(e + f*x)/(2*f) - 2*A*a**2*c**2*cos(e + f*x)/f + 2*A*a**2*c*d*x*sin(e + f*x)**2 + 2*A*a**2*c*d*x*
cos(e + f*x)**2 - 2*A*a**2*c*d*sin(e + f*x)**2*cos(e + f*x)/f - 2*A*a**2*c*d*sin(e + f*x)*cos(e + f*x)/f - 4*A
*a**2*c*d*cos(e + f*x)**3/(3*f) - 2*A*a**2*c*d*cos(e + f*x)/f + 3*A*a**2*d**2*x*sin(e + f*x)**4/8 + 3*A*a**2*d
**2*x*sin(e + f*x)**2*cos(e + f*x)**2/4 + A*a**2*d**2*x*sin(e + f*x)**2/2 + 3*A*a**2*d**2*x*cos(e + f*x)**4/8
+ A*a**2*d**2*x*cos(e + f*x)**2/2 - 5*A*a**2*d**2*sin(e + f*x)**3*cos(e + f*x)/(8*f) - 2*A*a**2*d**2*sin(e + f
*x)**2*cos(e + f*x)/f - 3*A*a**2*d**2*sin(e + f*x)*cos(e + f*x)**3/(8*f) - A*a**2*d**2*sin(e + f*x)*cos(e + f*
x)/(2*f) - 4*A*a**2*d**2*cos(e + f*x)**3/(3*f) + B*a**2*c**2*x*sin(e + f*x)**2 + B*a**2*c**2*x*cos(e + f*x)**2
 - B*a**2*c**2*sin(e + f*x)**2*cos(e + f*x)/f - B*a**2*c**2*sin(e + f*x)*cos(e + f*x)/f - 2*B*a**2*c**2*cos(e
+ f*x)**3/(3*f) - B*a**2*c**2*cos(e + f*x)/f + 3*B*a**2*c*d*x*sin(e + f*x)**4/4 + 3*B*a**2*c*d*x*sin(e + f*x)*
*2*cos(e + f*x)**2/2 + B*a**2*c*d*x*sin(e + f*x)**2 + 3*B*a**2*c*d*x*cos(e + f*x)**4/4 + B*a**2*c*d*x*cos(e +
f*x)**2 - 5*B*a**2*c*d*sin(e + f*x)**3*cos(e + f*x)/(4*f) - 4*B*a**2*c*d*sin(e + f*x)**2*cos(e + f*x)/f - 3*B*
a**2*c*d*sin(e + f*x)*cos(e + f*x)**3/(4*f) - B*a**2*c*d*sin(e + f*x)*cos(e + f*x)/f - 8*B*a**2*c*d*cos(e + f*
x)**3/(3*f) + 3*B*a**2*d**2*x*sin(e + f*x)**4/4 + 3*B*a**2*d**2*x*sin(e + f*x)**2*cos(e + f*x)**2/2 + 3*B*a**2
*d**2*x*cos(e + f*x)**4/4 - B*a**2*d**2*sin(e + f*x)**4*cos(e + f*x)/f - 5*B*a**2*d**2*sin(e + f*x)**3*cos(e +
 f*x)/(4*f) - 4*B*a**2*d**2*sin(e + f*x)**2*cos(e + f*x)**3/(3*f) - B*a**2*d**2*sin(e + f*x)**2*cos(e + f*x)/f
 - 3*B*a**2*d**2*sin(e + f*x)*cos(e + f*x)**3/(4*f) - 8*B*a**2*d**2*cos(e + f*x)**5/(15*f) - 2*B*a**2*d**2*cos
(e + f*x)**3/(3*f), Ne(f, 0)), (x*(A + B*sin(e))*(c + d*sin(e))**2*(a*sin(e) + a)**2, True))

________________________________________________________________________________________

Giac [A]  time = 1.30365, size = 420, normalized size = 1.25 \begin{align*} -\frac{B a^{2} d^{2} \cos \left (5 \, f x + 5 \, e\right )}{80 \, f} + \frac{1}{8} \,{\left (12 \, A a^{2} c^{2} + 8 \, B a^{2} c^{2} + 16 \, A a^{2} c d + 14 \, B a^{2} c d + 7 \, A a^{2} d^{2} + 6 \, B a^{2} d^{2}\right )} x + \frac{{\left (4 \, B a^{2} c^{2} + 8 \, A a^{2} c d + 16 \, B a^{2} c d + 8 \, A a^{2} d^{2} + 9 \, B a^{2} d^{2}\right )} \cos \left (3 \, f x + 3 \, e\right )}{48 \, f} - \frac{{\left (16 \, A a^{2} c^{2} + 14 \, B a^{2} c^{2} + 28 \, A a^{2} c d + 24 \, B a^{2} c d + 12 \, A a^{2} d^{2} + 11 \, B a^{2} d^{2}\right )} \cos \left (f x + e\right )}{8 \, f} + \frac{{\left (2 \, B a^{2} c d + A a^{2} d^{2} + 2 \, B a^{2} d^{2}\right )} \sin \left (4 \, f x + 4 \, e\right )}{32 \, f} - \frac{{\left (A a^{2} c^{2} + 2 \, B a^{2} c^{2} + 4 \, A a^{2} c d + 4 \, B a^{2} c d + 2 \, A a^{2} d^{2} + 2 \, B a^{2} d^{2}\right )} \sin \left (2 \, f x + 2 \, e\right )}{4 \, f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sin(f*x+e))^2*(A+B*sin(f*x+e))*(c+d*sin(f*x+e))^2,x, algorithm="giac")

[Out]

-1/80*B*a^2*d^2*cos(5*f*x + 5*e)/f + 1/8*(12*A*a^2*c^2 + 8*B*a^2*c^2 + 16*A*a^2*c*d + 14*B*a^2*c*d + 7*A*a^2*d
^2 + 6*B*a^2*d^2)*x + 1/48*(4*B*a^2*c^2 + 8*A*a^2*c*d + 16*B*a^2*c*d + 8*A*a^2*d^2 + 9*B*a^2*d^2)*cos(3*f*x +
3*e)/f - 1/8*(16*A*a^2*c^2 + 14*B*a^2*c^2 + 28*A*a^2*c*d + 24*B*a^2*c*d + 12*A*a^2*d^2 + 11*B*a^2*d^2)*cos(f*x
 + e)/f + 1/32*(2*B*a^2*c*d + A*a^2*d^2 + 2*B*a^2*d^2)*sin(4*f*x + 4*e)/f - 1/4*(A*a^2*c^2 + 2*B*a^2*c^2 + 4*A
*a^2*c*d + 4*B*a^2*c*d + 2*A*a^2*d^2 + 2*B*a^2*d^2)*sin(2*f*x + 2*e)/f